const disableHtmlBodyScroll = () => {
    var htmlEle:HTMLHtmlElement = document.getElementsByTagName("html")[0];
    htmlEle.classList.add("disable-scroll");
    
    var bodyEle:HTMLBodyElement = document.getElementsByTagName("body")[0];
    bodyEle.classList.add("disable-scroll");
}
const rollbackHtmlBodyStyle =() =>{
    var htmlEle:HTMLHtmlElement = document.getElementsByTagName("html")[0];
    htmlEle.classList.remove("disable-scroll");  
    
    var bodyEle:HTMLBodyElement = document.getElementsByTagName("body")[0];
    bodyEle.classList.remove("disable-scroll");  
}

const PageHelper = {
    disableHtmlBodyScroll,
    rollbackHtmlBodyStyle
};

export default PageHelper;